import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css' // element 样式
import 'element-ui/lib/theme-chalk/display.css' // element 布局断点样式
import './styles/theme/index.css' // 主题色
Vue.use(ElementUI, { size: 'small' })

// element提示
import { message_tip, notify_tip } from '@/utils/message'
Vue.prototype.$message_tip = message_tip
Vue.prototype.$notify_tip = notify_tip

// 打印
import Print from 'vue-print-nb'
Vue.use(Print)

// 全局自定义组件
import pagination from '@/components/pagination'
Vue.component('pagination', pagination)

// 文本复制
import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)

// 统一样式
import 'normalize.css'
// 全局样式
import '@/styles/index.scss'
// 阿里矢量图icon
import '@/iconfont/iconfont.css'
// 权限控制
import '@/permission'

// 全局过滤器
import * as filters from './filters'
Object.keys(filters).forEach(key => {
    Vue.filter(key, filters[key])
})

// 全局指令
import * as directives from '@/directives/index'
Object.keys(directives).forEach(key => {
    Vue.directive(key, directives[key])
})

Vue.config.productionTip = false

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
